﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="FillInRecord.aspx.cs" Inherits="PCMSofCC.Member.FillInRecord" %>

<asp:Content ID="Content2" ContentPlaceHolderID="Head" runat="server">
    <link href="../css/content.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
    <div id="container" class="container">
        <div id="fillInRecordContainer" class="fillInRecordContainer">
            <asp:GridView ID="gvCompleteRecord" runat="server" AutoGenerateColumns="False" CssClass="gridView"
                DataSourceID="SqlDataSource1" RowStyle-CssClass="gridViewItem1" AlternatingRowStyle-CssClass="gridViewItem2"
                DataKeyNames="Id">
                <RowStyle CssClass="gridViewItem1"></RowStyle>
                <Columns>
                    <asp:BoundField HeaderStyle-CssClass="gridViewHead" DataField="Name" HeaderText="评估项目"
                        SortExpression="Name">
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:BoundField>
                    <asp:BoundField HeaderStyle-CssClass="gridViewHead" DataField="MaxScore" HeaderText="考核分数"
                        SortExpression="MaxScore">
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:BoundField>
                    <asp:BoundField HeaderStyle-CssClass="gridViewHead" DataField="Criteria" HeaderText="评分标准"
                        SortExpression="Criteria">
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:BoundField>
                    <asp:BoundField HeaderStyle-CssClass="gridViewHead" DataField="Remark" HeaderText="备注"
                        SortExpression="Remark">
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderStyle-CssClass="gridViewHead" HeaderText="检查分数" SortExpression="Score">
                        <ItemTemplate>
                            <asp:TextBox ID="tbxScore" runat="server" Text='<%# Bind("Score") %>' Width="24px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                                ControlToValidate="tbxScore" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="*" ControlToValidate="tbxScore"
                                Display="Dynamic" Operator="DataTypeCheck" SetFocusOnError="True" Type="Integer"></asp:CompareValidator>
                        </ItemTemplate>
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderStyle-CssClass="gridViewHead" HeaderText="问题点" SortExpression="Problem">
                        <ItemTemplate>
                            <asp:TextBox ID="tbxProblem" CssClass="textBoxArea2" runat="server" Text='<%# Bind("Problem") %>'
                                TextMode="MultiLine" Rows="3"></asp:TextBox>
                        </ItemTemplate>
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderStyle-CssClass="gridViewHead" HeaderText="整改措施" SortExpression="Solution">
                        <ItemTemplate>
                            <asp:TextBox ID="tbxSolution" runat="server" CssClass="textBoxArea2" Text='<%# Bind("Solution") %>'
                                TextMode="MultiLine" Rows="3"></asp:TextBox>
                        </ItemTemplate>
                        <HeaderStyle CssClass="gridViewHead"></HeaderStyle>
                    </asp:TemplateField>
                </Columns>
                <AlternatingRowStyle CssClass="gridViewItem2"></AlternatingRowStyle>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
                SelectCommand="SELECT ScoreEntry.Name, ScoreEntry.MaxScore, ScoreEntry.Criteria, ScoreEntry.Remark, RecordEntry.Score, RecordEntry.Problem, RecordEntry.Solution, RecordEntry.Id FROM Record INNER JOIN RecordEntry ON Record.RecordId = RecordEntry.RecordId INNER JOIN ScoreEntry ON RecordEntry.ScoreEntryId = ScoreEntry.Id WHERE (Record.SiteId = @SiteId) AND (Record.Date = @Date)">
                <SelectParameters>
                    <asp:Parameter Name="SiteId" />
                    <asp:Parameter Name="Date" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
        </div>
        <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click" CssClass="button21" />
    </div>
</asp:Content>
